package exception;

import java.awt.*;
import java.io.IOException;

/**
 * throws的演示
 */
public class ThrowsDemo2 {
    public void dosome() throws IOException, AWTException{

    }
}
class SubClass extends ThrowsDemo2{

    //public void dosome() throws IOException, AWTException {}
    //public void dosome() throws  {} //不抛出也可以
    //public void dosome() throws IOException  {} //抛出部分也可以
    //public void dosome() throws IOException, AWTException {}
    //public void dosome() throws  FileNotFoundException{} //抛出父类异常的子类异常也可以



}
